﻿<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
		<span class="c-gray en">&gt;</span>
		公众号管理
		<span class="c-gray en">&gt;</span>
		公众号菜单
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l"> <a href="javascript:;" onclick="add_wx('修改菜单','{:url('admin/Weixin/createGzhMenue')}','550','600')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 修改菜单</a> </span>
			</div>
			<div class="mt-10">
				<table class="table table-border table-bordered table-bg table-hover table-sort">
					<thead>
						<tr class="text-c">
							<th width="100">菜单名</th>
							<th width="100">类型</th>
							<th width="120">等级</th>
							<th width="120">值</th>
						</tr>
					</thead>
					<tbody>
						{volist name="menu" id="va"}
							{if condition="array_key_exists('sub_button',$va)"}
								{volist name="va.sub_button" id="vo"}
								<tr class="text-c">
									<td>{$vo.name}</td>
									<td>{$vo.type}</td>
									<td>二级菜单</td>
									<td>
										{switch name="$vo.type"}
											{case value="view"}{$vo.url}{/case}
											{case value="click"}{$vo.key}{/case}
										{/switch}
									</td>
								</tr>
								{/volist}
							{else/}
								<tr class="text-c">
									<td>{$va.name}</td>
									<td>{$va.type}</td>
									<td>一级菜单</td>
									<td>
										{switch name="$va.type"}
											{case value="view"}{$va.url}{/case}
											{case value="click"}{$va.key}{/case}
										{/switch}
									</td>
								</tr>
							{/if}
						{/volist}
					</tbody>
				</table>
			</div>
		</article>
		<div id="edit_menu" style="width: 900px;height: 700px;margin: 20px 50px;">
			<p>修改菜单范例：</p>
			<textarea style="width: 500px;height: 400px;">
				{
				     "button":[
				     {    
				          "type":"click",
				          "name":"今日歌曲",
				          "key":"V1001_TODAY_MUSIC"
				      },
				      {
				           "name":"菜单",
				           "sub_button":[
				           {    
				               "type":"view",
				               "name":"搜索",
				               "url":"http://www.soso.com/"
				            },
				            {
				               "type":"click",
				               "name":"赞一下我们",
				               "key":"V1001_GOOD"
				            }]
				       }]
				 }
			</textarea>
			<p>微信开发文档地址：<a href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141013">https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141013</a></p>
		</div>
	</div>
</section>
</body>
<script type="text/javascript">
/*微信菜单-增加*/
function add_wx(title,url,w,h){
	layer_show(title,url,w,h);
}
</script>
</html>